/**
 * 
 */
package com.swg.cocobox.filetransfer.internal;

import java.nio.charset.Charset;

import com.swg.cocobox.filetransfer.command.ClientCommand;

/**
 * @author satriaprayoga
 *
 */
public class UTFCommandParser implements ClientCommandParser{

	@Override
	public ClientCommand parseCommand(byte[] commandData) {
		String commandStr=new String(commandData,Charset.forName("UTF-8"));
		String[] commands=commandStr.split("\\s");
		ClientCommand command=new ClientCommandImpl(Charset.forName("UTF-8"), commands[0], commands[1]);
		return command;
	}

}
